﻿<Application x:Class="mates_viz.MyApp"
    xmlns="http://schemas.microsoft.com/winfx/avalon/2005"
    xmlns:x="http://schemas.microsoft.com/winfx/xaml/2005"
    StartingUp="AppStartingUp">
    <Application.Resources>
        <Style x:Key="interestMenu" TargetType="{x:Type ContextMenu}">
			<Setter Property="Control.BorderBrush" Value="#990000"/>
			<Setter Property="Control.BorderThickness" Value="1"/>
			<Setter Property="Control.Background" Value="Black"/>
        </Style>
        <Style x:Key="interestMenuItem" TargetType="{x:Type MenuItem}">
			<Setter Property="Foreground" Value="White"/>
			<Setter Property="Background" Value="Black"/>
            <Style.Triggers>
                <Trigger Property="IsMouseOver" Value="true">
                    <Setter Property="Background" Value="#330000"/>
                </Trigger>
            </Style.Triggers>
        </Style>
        <Style x:Key="courseMenu" TargetType="{x:Type courseMenu}">
			<Setter Property="BorderBrush" Value="#995C00" />
			<Setter Property="BorderThickness" Value="1" />
			<Setter Property="Background" Value="Black" />
        </Style>
        <Style x:Key="courseMenuItem" TargetType="{x:Type MenuItem}">
			<Setter Property="Foreground" Value="White"/>
			<Setter Property="Background" Value="Black"/>
			<Style.Triggers>
				<Trigger Property="IsMouseOver" Value="true">
					<Setter Property="Background" Value="#422800"/>
				</Trigger>


			</Style.Triggers>
        </Style>
        <Style x:Key="messageText" TargetType="{x:Type TextBlock}">
			<Setter Property="Control.Foreground" Value="#dddddd"/>
			<Setter Property="Control.FontFamily" Value="Arial"/>
			<Setter Property="Control.FontSize" Value="12"/>
		</Style>
        <Style x:Key="messageText_Outgoing">
			<Setter Property="Control.Foreground" Value="#aaaaaa"/>
        </Style>
        <Style x:Key="userButton" TargetType="{x:Type Button}">
			<Setter Property="Template">
				<Setter.Value>
				<ControlTemplate>
					<StackPanel VerticalAlignment ="Center">
						<Path Style="topArc" Opacity="0.5" HorizontalAlignment="Center" Stroke="White" StrokeThickness="2">
							<Path.Data>
								<PathGeometry>
									<PathGeometry.Figures>
										<PathFigureCollection>
											<PathFigure>
												<PathFigure.Segments>
													<PathSegmentCollection>
														<StartSegment Point="0,0" />
														<ArcSegment 
														  Size="10,10" 
														  LargeArc="False" SweepFlag="True" 
														  Point="15,0"/>
													</PathSegmentCollection>
												</PathFigure.Segments>
											</PathFigure>
										</PathFigureCollection>
									</PathGeometry.Figures>
								</PathGeometry>
							</Path.Data>
						</Path>
						<ContentPresenter Margin="0 0 0 2" 
							 VerticalAlignment="Center" HorizontalAlignment="Center" />
						<Path Style="{StaticResource botArc}" Opacity="0.5" HorizontalAlignment="Center" Stroke="White" StrokeThickness="2">
							<Path.Data>
								<PathGeometry>
									<PathGeometry.Figures>
										<PathFigureCollection>
											<PathFigure>
												<PathFigure.Segments>
													<PathSegmentCollection>
														<StartSegment Point="0,0" />
														<ArcSegment 
														  Size="10,10" 
														  LargeArc="False" SweepFlag="False" 
														  Point="15,0"/>
													</PathSegmentCollection>
												</PathFigure.Segments>
											</PathFigure>
										</PathFigureCollection>
									</PathGeometry.Figures>
								</PathGeometry>
							</Path.Data>
						</Path>
					</StackPanel>
				</ControlTemplate>
			</Setter.Value>
			</Setter>
			
			<Style.Storyboards>

                <ParallelTimeline Name="HighlightUser_Interest" BeginTime="*null" Duration="Forever">
                    <SetterTimeline TargetName="topArc" Path="(Path.Stroke).(SolidColorBrush.Color)" FillBehavior="HoldEnd" >
                        <ColorAnimation From="White" To="#990000" Duration="0:0:0.25" FillBehavior="HoldEnd"/>
                    </SetterTimeline>
                    <SetterTimeline TargetName="botArc" Path="(Path.Stroke).(SolidColorBrush.Color)" FillBehavior="HoldEnd" >
                        <ColorAnimation From="White" To="#990000" Duration="0:0:0.25" FillBehavior="HoldEnd"/>
                    </SetterTimeline>
                    <SetterTimeline TargetName="topArc" Path="(Path.Opacity)" FillBehavior="HoldEnd" >
                        <DoubleAnimation From="0.5" To="1.0" Duration="0:0:0.25" FillBehavior="HoldEnd" />
                    </SetterTimeline>
                    <SetterTimeline TargetName="botArc" Path="(Path.Opacity)" FillBehavior="HoldEnd" >
                        <DoubleAnimation From="0.5" To="1.0" Duration="0:0:0.25" FillBehavior="HoldEnd" />
                    </SetterTimeline>
                    <SetterTimeline TargetName="topArc" Path="(Path.StrokeThickness)" FillBehavior="HoldEnd" >
                        <DoubleAnimation From="2" To="3" Duration="0:0:0.25" FillBehavior="HoldEnd" />
                    </SetterTimeline>
                    <SetterTimeline TargetName="botArc" Path="(Path.StrokeThickness)" FillBehavior="HoldEnd" >
                        <DoubleAnimation From="2" To="3" Duration="0:0:0.25" FillBehavior="HoldEnd" />
                    </SetterTimeline>
                </ParallelTimeline>
                <ParallelTimeline Name="HighlightUser_Course" BeginTime="*null" Duration="Forever">
                    <SetterTimeline TargetName="topArc" Path="(Path.Stroke).(SolidColorBrush.Color)" FillBehavior="HoldEnd" >
                        <ColorAnimation From="White" To="#995D00" Duration="0:0:0.25" FillBehavior="HoldEnd"/>
                    </SetterTimeline>
                    <SetterTimeline TargetName="botArc" Path="(Path.Stroke).(SolidColorBrush.Color)" FillBehavior="HoldEnd" >
                        <ColorAnimation From="White" To="#995D00" Duration="0:0:0.25" FillBehavior="HoldEnd"/>
                    </SetterTimeline>
                    <SetterTimeline TargetName="topArc" Path="(Path.Opacity)" FillBehavior="HoldEnd" >
                        <DoubleAnimation From="0.5" To="1.0" Duration="0:0:0.25" FillBehavior="HoldEnd" />
                    </SetterTimeline>
                    <SetterTimeline TargetName="botArc" Path="(Path.Opacity)" FillBehavior="HoldEnd" >
                        <DoubleAnimation From="0.5" To="1.0" Duration="0:0:0.25" FillBehavior="HoldEnd" />
                    </SetterTimeline>
                    <SetterTimeline TargetName="topArc" Path="(Path.StrokeThickness)" FillBehavior="HoldEnd" >
                        <DoubleAnimation From="2" To="3" Duration="0:0:0.25" FillBehavior="HoldEnd" />
                    </SetterTimeline>
                    <SetterTimeline TargetName="botArc" Path="(Path.StrokeThickness)" FillBehavior="HoldEnd" >
                        <DoubleAnimation From="2" To="3" Duration="0:0:0.25" FillBehavior="HoldEnd" />
                    </SetterTimeline>
                </ParallelTimeline>
                <ParallelTimeline Name="HighlightUser_Friend" BeginTime="*null" Duration="Forever">
                    <SetterTimeline TargetName="topArc" Path="(Path.Stroke).(SolidColorBrush.Color)" FillBehavior="HoldEnd" >
                        <ColorAnimation From="White" To="#FFFFFF" Duration="0:0:0.25" FillBehavior="HoldEnd"/>
                    </SetterTimeline>
                    <SetterTimeline TargetName="botArc" Path="(Path.Stroke).(SolidColorBrush.Color)" FillBehavior="HoldEnd" >
                        <ColorAnimation From="White" To="#FFFFFF" Duration="0:0:0.25" FillBehavior="HoldEnd"/>
                    </SetterTimeline>
                    <SetterTimeline TargetName="topArc" Path="(Path.Opacity)" FillBehavior="HoldEnd" >
                        <DoubleAnimation From="0.5" To="1.0" Duration="0:0:0.25" FillBehavior="HoldEnd" />
                    </SetterTimeline>
                    <SetterTimeline TargetName="botArc" Path="(Path.Opacity)" FillBehavior="HoldEnd" >
                        <DoubleAnimation From="0.5" To="1.0" Duration="0:0:0.25" FillBehavior="HoldEnd" />
                    </SetterTimeline>
                    <SetterTimeline TargetName="topArc" Path="(Path.StrokeThickness)" FillBehavior="HoldEnd" >
                        <DoubleAnimation From="2" To="3" Duration="0:0:0.25" FillBehavior="HoldEnd" />
                    </SetterTimeline>
                    <SetterTimeline TargetName="botArc" Path="(Path.StrokeThickness)" FillBehavior="HoldEnd" >
                        <DoubleAnimation From="2" To="3" Duration="0:0:0.25" FillBehavior="HoldEnd" />
                    </SetterTimeline>
                </ParallelTimeline>
                <ParallelTimeline Name="HighlightUser_FOF" BeginTime="*null" Duration="Forever">
                    <SetterTimeline TargetName="topArc" Path="(Path.Stroke).(SolidColorBrush.Color)" FillBehavior="HoldEnd" >
                        <ColorAnimation From="White" To="#FFFFFF" Duration="0:0:0.25" FillBehavior="HoldEnd"/>
                    </SetterTimeline>
                    <SetterTimeline TargetName="botArc" Path="(Path.Stroke).(SolidColorBrush.Color)" FillBehavior="HoldEnd" >
                        <ColorAnimation From="White" To="#FFFFFF" Duration="0:0:0.25" FillBehavior="HoldEnd"/>
                    </SetterTimeline>
                    <SetterTimeline TargetName="topArc" Path="(Path.Opacity)" FillBehavior="HoldEnd" >
                        <DoubleAnimation From="0.5" To="1.0" Duration="0:0:0.25" FillBehavior="HoldEnd" />
                    </SetterTimeline>
                    <SetterTimeline TargetName="botArc" Path="(Path.Opacity)" FillBehavior="HoldEnd" >
                        <DoubleAnimation From="0.5" To="1.0" Duration="0:0:0.25" FillBehavior="HoldEnd" />
                    </SetterTimeline>
                    <SetterTimeline TargetName="topArc" Path="(Path.StrokeThickness)" FillBehavior="HoldEnd" >
                        <DoubleAnimation From="2" To="3" Duration="0:0:0.25" FillBehavior="HoldEnd" />
                    </SetterTimeline>
                    <SetterTimeline TargetName="botArc" Path="(Path.StrokeThickness)" FillBehavior="HoldEnd" >
                        <DoubleAnimation From="2" To="3" Duration="0:0:0.25" FillBehavior="HoldEnd" />
                    </SetterTimeline>
                </ParallelTimeline>

            </Style.Storyboards>
        </Style>
        <Style x:Key="glowButtonSquare" TargetType ="{x:Type Button}">
			<Setter Property="Control.Foreground" Value="White"/>
			<Setter Property="Control.FontFamily" Value="#000099"/>
			<Setter Property="Control.Height" Value="17"/>
			<Setter Property="Control.HorizontalContentAlignment" Value="Center"/>
			<Setter Property="Control.VerticalContentAlignment" Value="Center"/>
			<Setter Property="Template">
				<Setter.Value>
					<!-- Define the visual tree -->
					<ControlTemplate>
						<Grid>
							<Rectangle Margin="1" Opacity="0" x:Name="inner" Fill="*Alias(Target=Background)"/>
							<Rectangle Margin="2" Opacity="0" x:Name="outer" Fill="*Alias(Target=Background)"/>
							<ContentPresenter ContentTemplate="{StaticResource ContentSite}" Margin="*Alias(Target=Padding)" 
								VerticalAlignment="{TemplateBinding Property=VerticalContentAlignment}"
								HorizontalAlignment="{TemplateBinding Property=HorizontalContentAlignment}" />
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
            <Style.Triggers>
                <!-- Pressed -->
				<Trigger Property="IsPressed" Value="True">
					<Setter TargetName="outer" Property="Rectangle.Opacity" Value="1.00" />
                </Trigger>
				<EventTrigger RoutedEvent="Mouse.MouseEnter">
					<EventTrigger.Actions>
						<BeginAction TargetName="MouseEnterTimeline" />
							<StopAction TargetName="MouseLeaveTimeline" />
						</EventTrigger.Actions>
					</EventTrigger>
				<EventTrigger RoutedEvent="Mouse.MouseLeave">
                    <EventTrigger.Actions>
                        <BeginAction TargetName="MouseLeaveTimeline" />
                        <StopAction TargetName="MouseEnterTimeline" />
                    </EventTrigger.Actions>
                </EventTrigger>
            </Style.Triggers>
            <Style.Storyboards>
                <ParallelTimeline Name="HighlightOnTimelineHOLD" BeginTime="*null" Duration="Forever">
                    <SetterTimeline TargetName="outer" Path="(Rectangle.Opacity)" FillBehavior="HoldEnd" >
                        <DoubleAnimation From="0" To="0.3" Duration="0:0:0.15" FillBehavior="HoldEnd" />
                    </SetterTimeline>
                </ParallelTimeline>
                <ParallelTimeline Name="HighlightOffTimelineHOLD" BeginTime="*null" Duration="Forever">
                    <SetterTimeline TargetName="outer" Path="(Rectangle.Opacity)" FillBehavior="HoldEnd" >
                        <DoubleAnimation From="0.3" To="0" Duration="0:0:0.15" FillBehavior="HoldEnd" />
                    </SetterTimeline>
                </ParallelTimeline>
                <ParallelTimeline Name="HighlightOnTimelineTEMP" BeginTime="*null">
                    <SetterTimeline TargetName="outer" Path="(Rectangle.Opacity)" FillBehavior="Deactivate" >
                        <DoubleAnimation From="0.4" To="0" Duration="0:0:3" FillBehavior="Deactivate" />
                    </SetterTimeline>
                </ParallelTimeline>
                <ParallelTimeline Name="MouseEnterTimeline" BeginTime="*null" Duration="Forever">
                    <SetterTimeline TargetName="inner" Path="(Rectangle.Opacity)" FillBehavior="HoldEnd" >
						<DoubleAnimation From="0" To="0.5" Duration="0:0:0.15" FillBehavior="HoldEnd" />
                    </SetterTimeline>
                </ParallelTimeline>
                <ParallelTimeline Name="MouseLeaveTimeline" BeginTime="*null" Duration="Forever">
                    <SetterTimeline TargetName="inner"  Path="(Rectangle.Opacity)" FillBehavior="HoldEnd" >
                        <DoubleAnimation From="0.5" To="0" Duration="0:0:0.45" FillBehavior="HoldEnd" />
                    </SetterTimeline>
                </ParallelTimeline>
            </Style.Storyboards>
        </Style>
        <Style x:Key="friendMenu" TargetType="{x:Type ContextMenu}">
			<Setter Property="BorderBrush" Value="#000099"/>
			<Setter Property="BorderThickness" Value="1"/>
			<Setter Property="Background" Value="Black"/>
        </Style>
        <Style x:Key="friendMenuItem" TargetType="{x:Type MenuItem}">
			<Setter Property="Foreground" Value="White"/>
			<Setter Property="Background" Value="Black"/>
            <Style.Triggers>
				<Trigger Property="IsMouseOver" Value="True">
                    <Setter Property="Background" Value="#000033"/>
                </Trigger>
            </Style.Triggers>
        </Style>
        <Style x:Key="glowButton" TargetType ="{x:Type Button}">
			<Setter Property="Foreground" Value="White"/>
			<Setter Property="Height" Value="17"/>
			<Setter Property="HorizontalContentAlignment" Value="Center"/>
			<Setter Property="VerticalContentAlignment" Value="Center"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate>
						<Grid>
							<Rectangle RadiusX="5" RadiusY="10" Margin="1" Opacity="0" x:Name="inner" Fill="*Alias(Target=Background)"/>
							<Rectangle RadiusX="5" RadiusY="10" Margin="2" Opacity="0" x:Name="outer" Fill="*Alias(Target=Background)"/>
							<ContentPresenter Style="ContentSite" Margin="*Alias(Target=Padding)" 
								VerticalAlignment="*Alias(Target=VerticalContentAlignment)" 
								HorizontalAlignment="*Alias(Target=HorizontalContentAlignment)" />
						</Grid>
					</ControlTemplate>
				</Setter.Value>				
			</Setter>
            <Style.Triggers>
                <!-- Pressed -->
                <Trigger Property="IsPressed" Value="true" >
                    <Setter TargetName="outer" Property="Rectangle.Opacity" Value="1.00" />
                </Trigger>
                <EventTrigger RoutedEvent="Mouse.MouseEnter" >
                    <EventTrigger.Actions>
                        <BeginAction TargetName="MouseEnterTimeline" />
                        <StopAction TargetName="MouseLeaveTimeline" />
                    </EventTrigger.Actions>
                </EventTrigger>
                <EventTrigger RoutedEvent="Mouse.MouseLeave">
                    <EventTrigger.Actions>
                        <BeginAction TargetName="MouseLeaveTimeline" />
                        <StopAction TargetName="MouseEnterTimeline" />
                    </EventTrigger.Actions>
                </EventTrigger>
            </Style.Triggers>
            <Style.Storyboards>
                <ParallelTimeline Name="HighlightOnTimelineHOLD" BeginTime="*null" Duration="Forever">
                    <SetterTimeline TargetName="outer" Path="(Rectangle.Opacity)" FillBehavior="HoldEnd" >
                        <DoubleAnimation From="0" To="0.3" Duration="0:0:0.15" FillBehavior="HoldEnd" />
                    </SetterTimeline>
                </ParallelTimeline>
                <ParallelTimeline Name="HighlightOffTimelineHOLD" BeginTime="*null" Duration="Forever">
                    <SetterTimeline  TargetName="outer" Path="(Rectangle.Opacity)" FillBehavior="HoldEnd" >
                        <DoubleAnimation From="0.3" To="0" Duration="0:0:0.15" FillBehavior="HoldEnd" />
                    </SetterTimeline>
                </ParallelTimeline>
                <ParallelTimeline Name="HighlightOnTimelineTEMP" BeginTime="*null">
                    <SetterTimeline  TargetName="outer" Path="(Rectangle.Opacity)" FillBehavior="Deactivate" >
                        <DoubleAnimation From="0.4" To="0" Duration="0:0:3" FillBehavior="Deactivate" />
                    </SetterTimeline>
                </ParallelTimeline>
                <ParallelTimeline Name="MouseEnterTimeline" BeginTime="*null" Duration="Forever">
                    <SetterTimeline  TargetName="inner" Path="(Rectangle.Opacity)" FillBehavior="HoldEnd" >
                        <DoubleAnimation From="0" To="0.5" Duration="0:0:0.15" FillBehavior="HoldEnd" />
                    </SetterTimeline>
                </ParallelTimeline>
                <ParallelTimeline Name="MouseLeaveTimeline" BeginTime="*null" Duration="Forever">
                    <SetterTimeline  TargetName="inner"  Path="(Rectangle.Opacity)" FillBehavior="HoldEnd" >
                        <DoubleAnimation From="0.5" To="0" Duration="0:0:0.95" FillBehavior="HoldEnd" />
                    </SetterTimeline>
                </ParallelTimeline>
            </Style.Storyboards>
        </Style>
    </Application.Resources>
</Application>